package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the COMPLAIN database table.
 * 
 */
@Entity
@NamedQuery(name="Complain.findAll", query="SELECT c FROM Complain c")
public class Complain implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="COMPLAIN_COMID_GENERATOR", sequenceName="SEQ_9")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="COMPLAIN_COMID_GENERATOR")
	@Column(name="COM_ID")
	private long comId;

	@Temporal(TemporalType.DATE)
	@Column(name="COM_DATETIME")
	private Date comDatetime;

	@Column(name="COM_DEAL_PROCESS")
	private String comDealProcess;

	@Column(name="COM_DEAL_RESULT")
	private BigDecimal comDealResult;

	@Column(name="COM_DESCRIBE")
	private String comDescribe;

	@Column(name="COM_FEEDBACK")
	private String comFeedback;

	@Column(name="COM_FIST_RECEIVER_ID")
	private BigDecimal comFistReceiverId;

	@Column(name="COM_FIST_RECEIVER_NAME")
	private String comFistReceiverName;

	@Column(name="COM_PEOPLE")
	private String comPeople;

	@Column(name="COM_REMARKS")
	private String comRemarks;

	@Column(name="COM_SURE")
	private BigDecimal comSure;

	@Column(name="COM_THEME")
	private String comTheme;

	@Column(name="COM_URGENCY")
	private BigDecimal comUrgency;

	@Column(name="CUSTOMER_ID")
	private BigDecimal customerId;

	@Column(name="CUSTOMER_NAME")
	private String customerName;

	//bi-directional many-to-one association to ComplainType
	@ManyToOne
	@JoinColumn(name="COM_CLASSIFY")
	private ComplainType complainType;

	//bi-directional many-to-one association to TimeDeal
	@ManyToOne
	@JoinColumn(name="COM_DEAL_TIME")
	private TimeDeal timeDeal;

	public Complain() { 
	}
	
	

	public Complain(long comId, Date comDatetime, String comDealProcess, BigDecimal comDealResult, String comDescribe,
			String comFeedback, BigDecimal comFistReceiverId, String comFistReceiverName, String comPeople,
			String comRemarks, BigDecimal comSure, String comTheme, BigDecimal comUrgency, 
			String customerName, ComplainType complainType, TimeDeal timeDeal) {
		super();
		this.comId = comId;
		this.comDatetime = comDatetime;
		this.comDealProcess = comDealProcess;
		this.comDealResult = comDealResult;
		this.comDescribe = comDescribe;
		this.comFeedback = comFeedback;
		this.comFistReceiverId = comFistReceiverId;
		this.comFistReceiverName = comFistReceiverName;
		this.comPeople = comPeople;
		this.comRemarks = comRemarks;
		this.comSure = comSure;
		this.comTheme = comTheme;
		this.comUrgency = comUrgency;
		this.customerName = customerName;
		this.complainType = complainType;
		this.timeDeal = timeDeal;
	}



	public Complain(long comId, Date comDatetime, String comDealProcess, BigDecimal comDealResult, String comDescribe,
			String comFeedback, BigDecimal comFistReceiverId, String comFistReceiverName, String comPeople,
			String comRemarks, BigDecimal comSure, String comTheme, BigDecimal comUrgency, BigDecimal customerId,
			String customerName) {
		super();
		this.comId = comId;
		this.comDatetime = comDatetime;
		this.comDealProcess = comDealProcess;
		this.comDealResult = comDealResult;
		this.comDescribe = comDescribe;
		this.comFeedback = comFeedback;
		this.comFistReceiverId = comFistReceiverId;
		this.comFistReceiverName = comFistReceiverName;
		this.comPeople = comPeople;
		this.comRemarks = comRemarks;
		this.comSure = comSure;
		this.comTheme = comTheme;
		this.comUrgency = comUrgency;
		this.customerId = customerId;
		this.customerName = customerName;
	}


	public long getComId() {
		return this.comId;
	}

	public void setComId(long comId) {
		this.comId = comId;
	}

	public Date getComDatetime() {
		return this.comDatetime;
	}

	public void setComDatetime(Date comDatetime) {
		this.comDatetime = comDatetime;
	}

	public String getComDealProcess() {
		return this.comDealProcess;
	}

	public void setComDealProcess(String comDealProcess) {
		this.comDealProcess = comDealProcess;
	}

	public BigDecimal getComDealResult() {
		return this.comDealResult;
	}

	public void setComDealResult(BigDecimal comDealResult) {
		this.comDealResult = comDealResult;
	}

	public String getComDescribe() {
		return this.comDescribe;
	}

	public void setComDescribe(String comDescribe) {
		this.comDescribe = comDescribe;
	}

	public String getComFeedback() {
		return this.comFeedback;
	}

	public void setComFeedback(String comFeedback) {
		this.comFeedback = comFeedback;
	}

	public BigDecimal getComFistReceiverId() {
		return this.comFistReceiverId;
	}

	public void setComFistReceiverId(BigDecimal comFistReceiverId) {
		this.comFistReceiverId = comFistReceiverId;
	}

	public String getComFistReceiverName() {
		return this.comFistReceiverName;
	}

	public void setComFistReceiverName(String comFistReceiverName) {
		this.comFistReceiverName = comFistReceiverName;
	}

	public String getComPeople() {
		return this.comPeople;
	}

	public void setComPeople(String comPeople) {
		this.comPeople = comPeople;
	}

	public String getComRemarks() {
		return this.comRemarks;
	}

	public void setComRemarks(String comRemarks) {
		this.comRemarks = comRemarks;
	}

	public BigDecimal getComSure() {
		return this.comSure;
	}

	public void setComSure(BigDecimal comSure) {
		this.comSure = comSure;
	}

	public String getComTheme() {
		return this.comTheme;
	}

	public void setComTheme(String comTheme) {
		this.comTheme = comTheme;
	}

	public BigDecimal getComUrgency() {
		return this.comUrgency;
	}

	public void setComUrgency(BigDecimal comUrgency) {
		this.comUrgency = comUrgency;
	}

	public BigDecimal getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(BigDecimal customerId) {
		this.customerId = customerId;
	}

	public String getCustomerName() {
		return this.customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public ComplainType getComplainType() {
		return this.complainType;
	}

	public void setComplainType(ComplainType complainType) {
		this.complainType = complainType;
	}

	public TimeDeal getTimeDeal() {
		return this.timeDeal;
	}

	public void setTimeDeal(TimeDeal timeDeal) {
		this.timeDeal = timeDeal;
	} 



	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Complain [comId=" + comId + ", comDatetime=" + comDatetime + ", comDealProcess=" + comDealProcess
				+ ", comDealResult=" + comDealResult + ", comDescribe=" + comDescribe + ", comFeedback=" + comFeedback
				+ ", comFistReceiverId=" + comFistReceiverId + ", comFistReceiverName=" + comFistReceiverName
				+ ", comPeople=" + comPeople + ", comRemarks=" + comRemarks + ", comSure=" + comSure + ", comTheme="
				+ comTheme + ", comUrgency=" + comUrgency + ", customerId=" + customerId + ", customerName="
				+ customerName + "]";
	}



	
}